<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Lotto</title>
<link href="../css/loto_lb.css?time=02" rel="stylesheet" type="text/css">
<script language="JavaScript">
<!--
var PopupNews;

function ReRefresh(){
	setInterval("getMarqueeMessage()", 180000);
	setInterval("window.status='Success'", 500);
}

var xmlHttp;
function createXMLHttpRequest(){
	if (window.XMLHttpRequest) {
		xmlHttp = new XMLHttpRequest();
	} else if (window.ActiveXObject) {
		xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
	}else{
		xmlHttp = null;
	}
}

function getMarqueeMessage(){
	var strDocLoc = "marquee.php?isMsg=1";

	createXMLHttpRequest();
	xmlHttp.onreadystatechange = handleStateChange;
	xmlHttp.open("GET", strDocLoc, true);
	xmlHttp.send(null);
}

function handleStateChange(){
	if(xmlHttp.readyState == 4){
		if(xmlHttp.status == 200){
			var xmlDoc = xmlHttp.responseXML;
			var objMarquee = xmlDoc.getElementsByTagName("Marquee");
			var objMMsg = objMarquee[0].getElementsByTagName("MMsg");
			var arrMMsg = new Array();
			for(var i = 0; i < objMMsg.length; i++){
				arrMMsg[i] = objMMsg[i].childNodes[0].nodeValue;
			}
			document.getElementById("Marquees").innerHTML = arrMMsg.join("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");

			var objPopup = xmlDoc.getElementsByTagName("PopupMsg");
			var objPopMsg = objPopup[0].getElementsByTagName("PopMsg");
			for(var i = 0; i < objPopMsg.length; i++){
				alert(objPopMsg[i].childNodes[0].nodeValue);
			}

			var objHKUrlLink = xmlDoc.getElementsByTagName("HKUrlLink");
			var objHKLink = objHKUrlLink[0].getElementsByTagName("HKLink");
			for(var i = 0; i < objHKLink.length; i++){
				document.getElementById("MarqueeIframe").src = objHKLink[i].childNodes[0].nodeValue;
			}
		}
	}
}
//-->
</script>
</head>

<body class="marquee_body" onload="ReRefresh();" oncontextmenu="window.event.returnValue=false" ondragstart="window.event.returnValue=false" onselectstart="event.returnValue=false">
<table border="0" cellpadding="0" cellspacing="0" class="marquee_css"><tr class="marquee_css">
<td class="marquee_css">
	<table border="0" cellpadding="0" cellspacing="0"><tr>
		<td class="marquee_head">&nbsp;</td>
		<td class="marquee_body"><!--O//--><marquee scrolldelay="180" id="Marquees" class="marquee_css">{Marquee}</marquee><!--O//--></td>
		<td class="marquee_tail">&nbsp;</td>
	</tr></table>
</td></tr></table>
<iframe id="MarqueeIframe" width="0" height="0" frameborder="0"></iframe>
</body>
</html>